package src.model.gameWorld;

import java.util.ArrayList;

/**
 * <b>Overview</b><br>
 * <p>The Research class aggregates and manages technologies.</p>
 * <br><br>
 * <b>Responsibilites</b><br>
 * <p>The Research class is responsible for managing the available and
 * researched techs, and managing the currently researching tech.</p>
 * <br><br>
 * <b>Collaborators</b>
 * <ul>
 * <li>Technology - Subcontractor</li>
 * <li>PlayerLookupTable - Subcontractor</li>
 * </ul>
 * <br><br>
 * <b>Implementor</b> - <br>
 * <b>Tester</b> - <br>
 * 
 * @author Brent
 *
 */
public class Research 
{
	private ArrayList<Technology> myAvailableTechs;
	private ArrayList<Technology> myResearchedTechs;
	
	private int myCurrentTechIndex;
	
	public Research(PlayerLookupTable plt, String filename)
	{
		//here you need to create the techs - only if there's time
	}
	
	public boolean researchCurrentTech()
	{
		/*
		boolean success = myAvailableTechs.get(myCurrentTechIndex).research();
		
		if(success)
		{
			myResearchedTechs.add(myAvailableTechs.get(myCurrentTechIndex));
			myAvailableTechs.remove(myCurrentTechIndex);
		}
		*/
		return false;
	}
	
	public Technology getCurrentTechnology()
	{
		return myAvailableTechs.get(myCurrentTechIndex);
	}
	
	public Technology selectNextTechnology()
	{
		myCurrentTechIndex++;
		myCurrentTechIndex %= myAvailableTechs.size();
		
		return myAvailableTechs.get(myCurrentTechIndex);
	}
	
	public ArrayList<Technology> availableTechnologies()
	{
		return myAvailableTechs;
	}
	
	public ArrayList<Technology> researchedTechnologies()
	{
		return myResearchedTechs;
	}
}
